package com.dss.dao;

import java.util.List;

import com.dss.po.ExpertDoc;
import com.infomanage.bean.FieldBean;
import com.infomanage.dao.BaseDAO;
import com.infomanage.exception.DaoException;

public class ExpertDocDAO extends BaseDAO<ExpertDoc>{
	
	public List<ExpertDoc> findDocsByExpertId(int expertId) throws DaoException{
		FieldBean fieldBean = new FieldBean();
		fieldBean.setName("expertId");
		fieldBean.setValue(expertId);
		return super.findByField(ExpertDoc.class, fieldBean);
	}
	
	public List<ExpertDoc> findDocsByKeyword(String keyword) throws DaoException{
		FieldBean fieldBean = new FieldBean();
		fieldBean.setName("keywords");
		fieldBean.setValue(keyword);
		fieldBean.setLike(true);
		return super.findByField(ExpertDoc.class, fieldBean);
	}
}
